const express = require('express') //引入express
const router = express.Router() // 创建路由对象

const middleware = function (req,res,next){
    console.log('我是中间件')
    next()
}
router.use(middleware)
router.get('/home',middleware,(req,res)=>{
    res.send('hello router get')
})

module.exports = router